package com.communal.model;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "role")
@AttributeOverrides({
	@AttributeOverride(name="enabled", column=@Column(name="enabled")),
	@AttributeOverride(name="id", column=@Column(name="id"))
})	
public class Role extends BaseEntity implements Serializable{

	private static final long serialVersionUID = -456782459293792271L;
	
	@Column(name = "name", unique = true, nullable = false, insertable = true, updatable = true, length = 20)
	private String name;

	/**
	 * Returns role name <br>
	 * @return {@link String}
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Sets role name <br>
	 * @param p_name {@link String}
	 */
	public void setName(String p_name) {
		name = p_name;
	}

}
